package com.cn.broker;

import io.netty.channel.ChannelHandlerContext;

import java.util.HashSet;
import java.util.Set;

/**
 * 存储slave节点
 */
public class BrokerChannelStore {

    private static Set<ChannelHandlerContext> cluster_channel = new HashSet<>();

    public static void put(ChannelHandlerContext ct) {
        if (ct == null) return;
        cluster_channel.add(ct);
    }

    public static void del(ChannelHandlerContext ct) {
        cluster_channel.remove(ct);
    }

    public static Set<ChannelHandlerContext> get() {
        return cluster_channel;
    }


}
